From 7335be9e47bd9eddc6b100f2ff8d96e6b5e2d21e Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 31 Oct 2008 08:56:42 +0000 Subject: [PATCH] =?utf8?q?Bug=20347230=20=E2=80=93=20testicontheme=20short?= =?utf8?q?comings?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit * tests/testicontheme.c (main): Use theme for "display" and quit on window closing svn path=/trunk/; revision=21739 --- ChangeLog | 7 +++++++ tests/testicontheme.c | 19 +++++++++++++++++-- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index daa8335fc8..a04b34074b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-10-31 Christian Dywan + + Bug 347230 – testicontheme shortcomings + + * tests/testicontheme.c (main): + Use theme for "display" and quit on window closing + 2008-10-30 Matthias Clasen Bug 558522 – scroll arrow painted insensitive even though there diff --git a/tests/testicontheme.c b/tests/testicontheme.c index 90d4eaad59..92a68aab32 100644 --- a/tests/testicontheme.c +++ b/tests/testicontheme.c @@ -68,6 +68,8 @@ main (int argc, char *argv[]) if (strcmp (argv[1], "display") == 0) { + GError *error; + GdkPixbuf *pixbuf; GtkWidget *window, *image; GtkIconSize size; @@ -82,10 +84,23 @@ main (int argc, char *argv[]) size = atoi (argv[4]); else size = GTK_ICON_SIZE_BUTTON; - + + error = NULL; + pixbuf = gtk_icon_theme_load_icon (icon_theme, argv[3], size, + GTK_ICON_LOOKUP_USE_BUILTIN, &error); + if (!pixbuf) + { + g_print ("%s\n", error->message); + return 1; + } + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); - image = gtk_image_new_from_icon_name (argv[3], size); + image = gtk_image_new (); + gtk_image_set_from_pixbuf (GTK_IMAGE (image), pixbuf); + g_object_unref (pixbuf); gtk_container_add (GTK_CONTAINER (window), image); + g_signal_connect (window, "delete-event", + G_CALLBACK (gtk_main_quit), window); gtk_widget_show_all (window); gtk_main (); -- 2.30.2